from django.contrib.auth.mixins import LoginRequiredMixin
from django import http
from ershou_shop.utils.response_code import RETCODE


class LoginRequiredJsonMixin(LoginRequiredMixin):

    def handle_no_permission(self):
        return http.JsonResponse({'code':RETCODE.SESSIONERR,'errmsg':'用户未登录'})
